<script setup>
import { computed, ref } from 'vue'
const totalCount = ref(100)
// 计算属性 可以用箭头函数简写
const disCount = computed(() => {
  return totalCount.value * 0.9
})
</script>
<template>
  <h1> 原价{{totalCount}}</h1>
  <h1> 折扣价{{disCount}}</h1>
  <button @click="totalCount+=100">修改原价</button>
</template>
<style></style>
